#!/usr/bin/python
from compiler import * 
import os
import sys
for i in range(1,12):
	try:
		compile_scheme_file('tests/Ctest'+str(i),'Ctest'+str(i)+'.asm')
	except :
		print "ERROR (prob noMatch or KeyError, run part_run.py to run individual test)\n"
	os.system("make Ctest"+str(i)+".bin")
	os.system("rm -f Ctest"+str(i)+".c")
	print "######Ctest"+str(i)+"######\n"
	os.system("./Ctest"+str(i)+".bin")
	os.system("rm -f Ctest"+str(i)+".bin")

	print "#####EXPECTED RESULTS:######\n"
	os.system("grep -A 50 results tests/Ctest"+str(i))
	
	print "#############################\n"

